<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <meta name = "format-detection" content = "telephone=no">
    <title>订单结算</title>
    <link rel="stylesheet" href="__PUBLIC__/Home/css/cart.css?v=20170411001">
    <include file="Public/common_js"/>
    <script>
        window.localStorage.setItem('isThrough',null);
    </script>
</head>
<body>
<div class="warp" style="padding-bottom:1.1rem;">

    <!-- 配送地址 -->
    <div class="address">
        <div class="address-list">
            <!-- 有地址 -->
            <div class="address-item">
                <h3>收货人：<span id="receipt">{$addr.name}</span><span id="mobile">{$addr.mobile}</span></h3>
                <h4>收货地址:<span id="addrpriv">{$addr.area}</span><span id="adddetaile">{$addr.addr}</span></h4>
            </div>
        </div>
    </div>
    <!-- 订单包 -->
    <volist name="checkout" key="k" id="orderItem">
      <if condition="$orderItem['checked_num'] neq 0">
          <if condition="$orderItem['is_self'] neq 1">

    <div class="order-package mgTop" data-total="{$orderItem['local_total']|number_format=###, 2, '.', ''}" data-fee="{$orderItem['ship_fee']}" data-free="{$orderItem['free']}" data-dkPrice="{$orderItem['bonus_money']|number_format=###, 2, '.', ''}">
        <notempty name="orderItem['coupon']">
        <div style="display: none" class="coupondis">
            <volist name="orderItem['coupon']"  id="orderCoupon">
                <if condition="$orderCoupon['Is_use'] eq 1">
                <li  data-id="{$orderCoupon['code']}"  data-lid="{$orderCoupon['local_id']}" data-money="{$orderCoupon['discmoney']}" data-tomoney="{$orderCoupon['to_money']}" data-did="{$orderCoupon['id']}">{$orderCoupon['name']}</li>
                  </if>
            </volist>
        </div>
        </notempty>
        <div class="package-name clearfix" data-lid="{$orderItem['local_id']}" data-m="{$orderItem['mobile']}">
            <h3 class="fl">包裹{$orderItem['inum']}</h3>
            <h5 class="fr">{$orderItem['local_name']}</h5>
        </div>
        <ul>
            <li>

               <volist name="orderItem.products" id="item">
                <if condition="$item['type'] neq 1 and $item['ischeck'] eq 1 and $item['active'] eq 1">
                <div class="goods-item clearfix" data-type="{$item['type']}" data-pid="{$item['product_id']}" data-lid="{$item['local_id']}">
                    <div class="img"><img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="{$item.goods_id|getThumb=###}"></div>
                    <div class="goods-text">
                        <p class="name text-hide">{$item['name']}</p>
                        <p class="norms">{$item['spec_info']}</p>
                        <p class="price clearfix">
                            <span class="fl"><label>￥</label>
                                <!--id="data_price"-->
   <label class="data_price" style="color: #da3558;">{$item['final_price']|number_format=###, 2, '.', ''}</label>
                                <!--<label>￥{$item['marketprice']|number_format=###, 2, '.', ''}</label>-->
                                <label></label>
                            </span>
                            <span class="fr">{$item['cart_num']}</span>
                        </p>
                    </div>
                </div>
                 <else/>
                    <volist name="item.group_products" id="gitem">
                        <if condition="$item['active'] eq 1 and $item['ischeck'] eq 1">
                        <div class="goods-item clearfix  group" data-gid="{$item['group_id']}" data-type="{$item['type']}" data-pid="{$gitem['product_id']}"
                             data-lid="{$item['local_id']}">
                           <div class="img"><img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="{$gitem.goods_id|getThumb=###}"></div>
                           <div class="goods-text">
                               <p class="name text-hide">{$gitem['product_name']}</p>
                               <!--id="is_spec_info"-->
                               <p class="norms"  class="is_spec_info">{$gitem['spec_info']}</p>
                               <!--id="pack_id"-->

                               <p class="price clearfix">
                                   <!--id="data_price"-->
                                   <span  class="pack_id" style="color: #ff2e49; font-size: 0.26rem">{$gitem['name']} 总价：{$gitem['total_price']|number_format=###, 2, '.', ''}</span>
                                   <span class="fr">{$gitem['num']}</span>
                               </p>
                           </div>
                       </div>
                         </if>
                      </volist>
                 </if>
                </volist>

            </li>



            <if condition="$orderItem['tc_num'] != ''">
                <li class="message">
                    <p class="fl">套餐数量</p>
                    <p class="fr">{$orderItem['tc_num']}套</p>
                </li>
            </if>


            <li class="delivery">
                <p class="fl">配送方式</p>
                <if condition="$orderItem['shipping'] eq 1">
                    <p class="fr logistic-method" data-id="{$orderItem['shipping']}">送货上门</p>
                    <p class="fr expect-time">{$orderItem['expected_time']}</p>
                 <elseif  condition="$orderItem.shipping eq 2"/>
                    <p class="fr logistic-method" data-id="{$orderItem['shipping']}">自提</p>
                    <p class="fr expect-time">{$orderItem['expected_time']}</p>
                    <p class="clearfix"></p>
                    <p class="zt-address" style="display:block">自提地址：{$orderItem['zT_addr']}</p>
                </if>


            </li>





            <notempty name="orderItem['coupon']">
            <li class="coupon-use clearfix">
                <h3>使用礼券</h3>
                <a href="javascript:void(0);">请选择</a>
            </li>
             </notempty>

            <notempty name="orderItem['order_pro']">
            <!-- 促销方式 -->
            <li class="message" style="line-height: inherit;">
                <p class="fl">促销方式</p>
                <p class="fr">
                    <volist id="order_pro" name="orderItem['order_pro']">
                        <span class="red">{$order_pro['name']}</span>
                        <br style="height: 1px">
                    </volist>
                </p>
            </li>
            </notempty>


            <if condition="$orderItem['bonus_money'] gt 0">
            <li class="deduct-use">
                可用{$orderItem['bonus_money']}奖金抵扣{$orderItem['bonus_money']|number_format=###, 2, '.', ''}元
            </li>
            </if>

            <li class="message">
                <!--id="msg"-->
                <p class="fl">备注留言</p><p class="fr"><input type="text"  class="package-msg" value="" placeholder="选填:对本次交易的说明(建议写清楚自己的.....)"></p></li>



            <li class="package-settment">
                <p class="discount"></p>
                <p class="total">
                    <!--id="ship_fee"-->
                    <if condition="$orderItem['ship_fee_status'] neq 1">
                    <span >(含运费<em>{$orderItem['ship_fee']|number_format=###, 2, '.', ''}</em>元)</span><span><label>合计:</label>
                     <else/>
                        <span >(订单免运费)</span><span><label>合计:</label>
                    </if>
                    <!--id="local_total"-->
                     <label  class="package-total" data-costitem="{$orderItem['lp_fee']|number_format=###, 2, '.', ''}"   data-weight="{$orderItem['total_weight']}" data-final="{$orderItem['local_total']|number_format=###, 2, '.', ''}">￥{$orderItem['local_total']|number_format=###, 2, '.', ''}</label>
                </span>
                </p>

            </li>




        </ul>
    </div>

           <else/>

      <div class="order-package mgTop" data-total="{$orderItem['local_total']|number_format=###, 2, '.', ''}" data-fee="{$orderItem['ship_fee']}" data-free="{$orderItem['free']}">
          <notempty name="orderItem['coupon']">
              <div style="display: none" class="coupondis">
                  <volist name="orderItem['coupon']"  id="orderCoupon">
                      <if condition="$orderCoupon['Is_use'] eq 1">
                          <li  data-id="{$orderCoupon['code']}" <if condition="$orderCoupon['Ispaita'] eq 1">class='only'</if> data-lid="{$orderCoupon['local_id']}" data-money="{$orderCoupon['discmoney']}" data-tomoney="{$orderCoupon['to_money']}" data-did="{$orderCoupon['id']}">{$orderCoupon['name']}</li>
                      </if>
                  </volist>
              </div>
          </notempty>
          <div class="package-name clearfix" data-lid="{$orderItem['local_id']}" data-m="{$orderItem['mobile']}">
              <h3 class="fl">包裹{$orderItem['inum']}</h3>
              <h5 class="fr"><if condition = "$orderItem['area_start'] neq ''">{$orderItem['area_start']}始发·</if>{$orderItem['local_name']}</h5>
          </div>
          <ul>
              <li>

                  <volist name="orderItem.products" id="item">
                      <if condition="$item['type'] neq 1 and $item['ischeck'] eq 1 and $item['active_ident'] eq 1">
                          <div class="goods-item clearfix" data-type="{$item['type']}" data-pid="{$item['product_id']}" data-lid="{$item['local_id']}">
                              <div class="img"><img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="{$item.goods_id|getThumb=###}"></div>
                              <div class="goods-text">
                                  <p class="name text-hide">{$item['name']}</p>
                                  <p class="norms">{$item['spec_info']}</p>
                                  <p class="price clearfix">
                    <span class="fl"><label>￥</label>
                        <!--id="data_price"-->
    <label class="data_price" style="color: #da3558;">{$item['final_price']|number_format=###, 2, '.', ''}</label>
                        <label></label>
                    </span>
                                      <span class="fr">{$item['cart_num']}</span>
                                  </p>
                              </div>
                          </div>
                          <else/>
                          <volist name="item.group_products" id="gitem">
                              <if condition="$item['active_ident'] eq 1 and $item['ischeck'] eq 1">
                                  <div class="goods-item clearfix  group" data-gid="{$item['group_id']}" data-type="{$item['type']}" data-pid="{$gitem['product_id']}"
                                       data-lid="{$item['local_id']}">
                                      <div class="img"><img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="{$gitem.goods_id|getThumb=###}"></div>
                                      <div class="goods-text">
                                          <p class="name text-hide">{$gitem['product_name']}</p>
                                          <!--id="is_spec_info"-->
                                          <p class="norms"  class="is_spec_info">{$gitem['spec_info']}</p>
                                          <!--id="pack_id"-->

                                          <p class="price clearfix">
                                              <!--id="data_price"-->

                                              <span  class="pack_id" style="color: #ff2e49; font-size: 0.26rem">{$gitem['name']} 总价：{$gitem['total_price']|number_format=###, 2, '.', ''}</span>


                                              <span class="fr">{$gitem['num']}</span>
                                          </p>
                                      </div>
                                  </div>
                              </if>
                          </volist>
                      </if>
                  </volist>

              </li>

              <if condition="$orderItem['is_self'] == 1">
              <li class="message">
                  <p class="fl">进口税</p>
                  <p class="fr red">￥{$orderItem['import_duty']|number_format=###, 2, '.', ''}</p>
              </li>
              </if>

              <if condition="$orderItem['tc_num'] != ''">
                  <li class="message">
                      <p class="fl">套餐数量</p>
                      <p class="fr">{$orderItem['tc_num']}套</p>
                  </li>
              </if>


              <li class="delivery">
                  <p class="fl">配送方式</p>
                  <if condition="$orderItem['shipping'] eq 1">
                      <p class="fr logistic-method" data-id="{$orderItem['shipping']}">送货上门</p>
                      <p class="fr expect-time">{$orderItem['expected_time']}</p>
                      <elseif  condition="$orderItem.shipping eq 2"/>
                      <p class="fr logistic-method" data-id="{$orderItem['shipping']}">自提</p>
                      <p class="fr expect-time">{$orderItem['expected_time']}</p>
                      <p class="clearfix"></p>
                      <p class="zt-address" style="display:block">自提地址：{$orderItem['zT_addr']}</p>
                  </if>


              </li>





              <notempty name="orderItem['coupon']">
                  <li class="coupon-use clearfix">
                      <h3>使用礼券</h3>
                      <a href="javascript:void(0);">请选择</a>
                  </li>
              </notempty>

              <notempty name="orderItem['order_pro']">
                  <!-- 促销方式 -->
                  <li class="message" style="line-height: inherit;">
                      <p class="fl">促销方式</p>
                      <p class="fr">
                          <volist id="order_pro" name="orderItem['order_pro']">
                              <span class="red">{$order_pro['name']}</span>
                              <br style="height: 1px">
                          </volist>
                      </p>
                  </li>
              </notempty>

              <li class="message">
                  <!--id="msg"-->
                  <p class="fl">备注留言</p><p class="fr"><input type="text"  class="package-msg" value="" placeholder="选填:对本次交易的说明(建议写清楚自己的.....)"></p></li>



              <li class="package-settment">
                  <p class="discount"></p>
                  <p class="total">
                      <!--id="ship_fee"-->
                      <if condition="$orderItem['ship_fee_status'] neq 1">
                          <span >(含运费<em>{$orderItem['ship_fee']|number_format=###, 2, '.', ''}</em>元)</span><span><label>合计:</label>
             <else/>
                <span >(订单免运费)</span><span><label>合计:</label>
                      </if>
                      <!--id="local_total"-->
                      <label  class="package-total" data-costitem="{$orderItem['lp_fee']|number_format=###, 2, '.', ''}"   data-weight="{$orderItem['total_weight']}" data-final="{$orderItem['local_total']|number_format=###, 2, '.', ''}">￥{$orderItem['local_total']|number_format=###, 2, '.', ''}</label>
                      </span>
                  </p>

              </li>




          </ul>
      </div>
      </if>
      </if>
    </volist>
    <!-- 支付方式 -->
    <div class="pay-method mgTop">
        <h3>支付方式</h3>
        <ul>
            <li class="active"><img src="__PUBLIC__/Home/images/wx-pay.png" alt=""><span data-id="1">微信支付</span></li>
          <!-- <li><img src="__PUBLIC__/Home/images/yzf-pay.png" alt=""><span data-id="2">翼支付</span></li>
            <li><img src="__PUBLIC__/Home/images/kq-pay.png" alt=""><span data-id="3">快钱支付</span></li>-->
           <!-- <li><img src="__PUBLIC__/Home/images/yijifu-pay.png" alt=""><span data-id="4">易极付</span></li>-->
        </ul>
    </div>
    <div class="order-all-favours mgTop">
        <ul>
            <li><p class="fl">商品优惠</p><p class="fr">￥{$total['save']|number_format=###, 2, '.', ''}</p></li>
            <if condition="$total['disOrderMoney'] neq 0">
            <li><p class="fl">订单优惠</p><p class="fr">￥{$total['disOrderMoney']|number_format=###, 2, '.', ''}</p></li>
            </if>
            <if condition="$total['coupon'] neq 0">
            <li><p class="fl">赠送</p><p class="fr">{$total['coupon']}张优惠券</p></li>
            </if>
            <li><p class="fl">礼券抵扣</p><p class="fr" id="lj_real_discount">￥0.00</p></li>
            <li><p class="fl">奖金抵扣</p><p class="fr" id="jj_dknum">￥0.00</p></li>
            <li><p class="fl">运费</p><p class="fr">￥{$total['ship_fee']|number_format=###, 2, '.', ''}</p></li>
        </ul>
    </div>
</div>
<!-- 结算信息 -->
<div class="order-settment mgTop">
     <p class="fl"><label>应付金额:</label>&nbsp;<label id="last_price" data-all="{$total['total_fee']|number_format=###, 2, '.', ''}">¥{$total['total_fee']|number_format=###, 2, '.', ''}</label></p>
     <a href="javascript:void(0);" class="order-settment-btn">结算</a>
</div>
<!-- 优惠券弹窗 -->
<div class="coupon-tips">
    <a href="javascript:void(0);" class="close"></a>
    <h2>店铺礼券</h2>
    <ul></ul>
    <a href="javascript:void(0);" class="btn btn-block btn-second angle">确定</a>
</div>
<script type="text/javascript">
    require(['cart/order']);
    $(function () {
        var rnumber = Math.floor(Math.random()*1000);
        history.replaceState({mod: rnumber}, 'Title', '?mod='+rnumber);

        $.ajax({
            url:"{:U('Carts/isBuyOk/')}",
            datatype:'json',
            success:function(data){
                if(data['status']==1){
                    window.location.href = data.url;
                }
            },
            error:function(){
                _global.promote.alertPopup("服务器异常，请稍后尝试！");
            }
        })
    })

</script>
</body>
</html>